package com.blog.mapper;

import com.blog.dto.AddCategoryByWorksDTO;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface WorksCategoryMapper {

    //根据作品ID删除其对应的类别
    @Delete("delete from tb_works_category where works_id = #{currentWorksId}")
    public void deleteByWorksId(@Param("currentWorksId") Long currentWorksId);


    void insertBatch(@Param("ids") List<Long> categoryIds,@Param("currentWorksId") Long currentWorksId);
}
